docs(npm): correct trusted-publishing guidance (it works via the reusable workflow) - #104
Merged
Merged
Conversation
…sable workflow #103 wrongly stated OIDC trusted publishing can't work through this reusable workflow. It does: many @Zondax packages (casper/filecoin/substrate/...) publish via it with OIDC and no token. The real requirement is that the package's npm Trusted Publisher must use Workflow filename '_publish-npm.yaml' (this file = the job_workflow_ref npm matches), NOT the caller's workflow filename. @zondax/cli failed only because its Trusted Publisher named 'publish-npm.yaml' (its caller). Correct the header to give the right configuration.
…avior
Per npm docs, for reusable/workflow_call publishing the Trusted Publisher's
Workflow filename must be the CALLER's workflow (not this file), and npm flags
this path as finicky ('checks the calling workflow's name ... can cause
configuration mismatches'). Recommend self-contained publish as the reliable
fallback. Corrects my earlier '_publish-npm.yaml' guidance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correction to #103
#103 claimed npm OIDC trusted publishing can't work through this reusable workflow. That's wrong — I jumped to it from
@zondax/cli's symptom without checking the rest of the org. This PR fixes the misleading note.What's actually true (org-wide evidence)
Most
@zondaxpackages publish to npm through this reusable workflow, with OIDC and no token, and succeed:So the workflow is fine. npm validates the OIDC
job_workflow_ref= this file (_publish-npm.yaml). The package's npm Trusted Publisher must therefore set:_publish-npm.yaml(this file), not the caller's filename.@zondax/clifailed only because its Trusted Publisher namedpublish-npm.yaml(its caller). The working repos must have_publish-npm.yamlconfigured.Who's actually affected
Only repos whose Trusted Publisher names their caller workflow rather than
_publish-npm.yaml— concretely the two with failing publishes:ledger-flare-jsandledger-algorand-js. Fix = set their npm Trusted Publisher Workflow filename to_publish-npm.yaml(no code change).(The OIDC-diagnostic fix from #103 is correct and retained.)
🤖 Generated with Claude Code